<template>
  <div>
    <div v-for="(item, index) in list" :key="index">
      <div v-for="(childItem, childIndex) in columns" :key="childIndex">
        <span v-if="childItem.prop && item[childItem.prop]">{{
          item[childItem.prop]
        }}</span>
        <div v-else-if="childItem.children" v-html="childItem.children.innerHTML"></div>
        <div v-else></div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "table-body",
  data() {
    return {
      columns: [],
      list: [],
    };
  },
  mounted() {
    this.columns = this.$parent.columns;
    this.list = this.$parent.list;
    console.log("this.columns", this.columns);
  },
};
</script>